package calculator;

/**
 * 除法运算器.
 *
 * @author GongXincheng
 * @since 2019-09-13 14:01
 */
public class OperationDiv extends AbstractOperation {

    @Override
    double getResult() {
        if (this.getRightNum() == 0) {
            throw new RuntimeException("除数不能为0");
        }
        return this.getLeftNum() / this.getRightNum();
    }

}
